<template>
  <div>
    <ElButton @click="request1"> 请求一</ElButton>
    <ElButton @click="request2"> 请求二</ElButton>
  </div>
</template>
<script lang="js" setup>
import axios from "axios"
const request1 = async ()=>{
    const res = await axios({
        url:'http://localhost:8080/test/time',
        method:'get',
        // data:
    
    })
    console.log("res1",res)
}

import request from '@/util/request.js'
const request2 = async () => {
    const res = await request({
        url:'/test/time',
        method:'get'
    })
    console.log("res2",res)
}

</script>
<style lang="scss" scoped></style>